require.config({
  urlArgs: "version=20170407",
  paths: {
    'jquery': '../packages/jquery-2.14-min',
    'bootfileinput':'../../bootstrap/bootstrap-fileinput/js/fileinput.min'
  },
  shim: {
    'bootstrap': {
      deps: ['jquery'],
      exports: 'bootstrap'
    }
  }

});

require(['jquery','bootfileinput'], function ($) {

  $("#newFile").fileinput({
    language: 'zh', //设置语言
    uploadUrl:  "/document/upload/doc", //上传的地址
    //  allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀
    previewFileType: "image",
    browseClass: "btn btn-primary", //按钮样式
    enctype: 'multipart/form-data',
    showRemove: false, //是否显示上传按钮
    //showUpload: false, //是否显示上传按钮
    showClose: false
  })
      .on("fileuploaded", function(event, data) {
        if(data.response.status==200)
        {
          alert("上传成功！！");
          $("#next_step").attr('disabled',false);
        }else{
          alert("上传失败！！");

        }
      });

});
